#!/usr/bin/python
import os

from Component import Component
from Module import Module
from Joomla import Joomla

command_index = 2
section_index = 1
#if __file__ == "__main__":    
if os.sys.argv[section_index] == "module":
    obj = Module(os.curdir, os.sys.argv[3])
if os.sys.argv[section_index] == "component":
    obj = Component(os.curdir, os.sys.argv[3])

if os.sys.argv[command_index] == "create":
    obj.create()
if os.sys.argv[command_index] == "add_file":
    name = raw_input("name:")
    obj.add_file(name)
if os.sys.argv[command_index] == "add_table":
    obj.addTable()





